package com.classs;

public class Test {

    public static void main(String[] args) {
        run(A.class);
        run(AB.class);
    }

    public static <T extends A>   void run(Class<T> tClass){
        Demo cl = tClass.getAnnotation(Demo.class);
        if(null != cl){
            System.out.println(cl.value());
        }

    }

}
